<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/core" prefix="c"%>
<%@ taglib uri="/tags/fmt" prefix="fmt"%>
<script type="text/javascript" src="js/utils.js"></script>

<html:form action="/goBalance" method="POST">
	<table align="center" width="40%" cellpadding="2" cellspacing="1" border="0">
		<tr>
			<td colspan="5" class="etiqueta" style="text-align: center;"> 
			  <fieldset>
				<legend> <bean:message key="title.credit.line"/> </legend>
				<bean:write name="BalanceForm" property="creditLineView.description"/>&nbsp;&nbsp;&nbsp;&nbsp;				
				<bean:write name="BalanceForm" property="creditLineView.limit" format="###,###,##0.00"/>&nbsp;&nbsp;&nbsp;&nbsp;
				(<bean:write name="BalanceForm" property="creditLineView.outOfCredit" format="##0.00"/><bean:message key="label.credit.line.symbol"/>
				<bean:write name="BalanceForm" property="totalCreditLimit" format="###,###,##0.00"/>)		
			  </fieldset>		
			</td>	
		</tr>
		
		<tr>
		    <td class="etiqueta">
		    	<bean:message key="label.balance.init.period" />
		    </td>
			<td>
				<select name="monthsPeriodInit" style="width:160px" class="campo_texto">
					<c:forEach items="${monthsPeriodsViewsInit}" var="monthPeriodViewInit">
						<c:choose>
							<c:when test="${monthPeriodViewInit.month == initMonthPeriodView.month && monthPeriodViewInit.year == initMonthPeriodView.year}">
								<option value="<c:out value="${monthPeriodViewInit.monthPeriodId}"/>" selected="selected"><c:out value="${monthPeriodViewInit.listDescription}"/></option>
							</c:when>
							<c:otherwise>
							<option value="<c:out value="${monthPeriodViewInit.monthPeriodId}"/>"><c:out value="${monthPeriodViewInit.listDescription}"/></option>
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</select>
			</td>
			
			<td class="etiqueta">
				<bean:message key="label.balance.end.period"/>
			</td>
			<td>
				<select name="monthsPeriodEnd" style="width:160px" class="campo_texto">
					<c:forEach items="${monthsPeriodsViewsEnd}" var="monthPeriodViewEnd">
						<c:choose>
							<c:when test="${monthPeriodViewEnd.month == endMonthPeriodView.month && monthPeriodViewEnd.year == endMonthPeriodView.year}">
								<option value="<c:out value="${monthPeriodViewEnd.monthPeriodId}"/>" selected="selected"><c:out value="${monthPeriodViewEnd.listDescription}"/></option>
							</c:when>
							<c:otherwise>
							<option value="<c:out value="${monthPeriodViewEnd.monthPeriodId}"/>"><c:out value="${monthPeriodViewEnd.listDescription}"/></option>
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</select>			 	
			</td>
			<td class="columnadatoPar">
				<html:submit styleClass="boton"><bean:message key="label.common.query"/></html:submit>
			</td>
		</tr>		
	</table>
	<br />
	<br />		        
</html:form>

		
